<template>
  <div class="tags">
    <div class="tag" v-for="(tag, index) in tags" :key="index" @click="$router.push('/subject/' + tag.id)">
      <span class="icon">
        <img src="@/assets/goImages/sJ.png" alt="" />
      </span>
      <span class="text">{{ tag.title }}</span>
      <span class="icon">
        <img src="@/assets/goImages/sJ.png" alt="" />
      </span>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    tags: Array
  }
}
</script>

<style lang="less" scoped>
.tags {
  padding: 10px 0;
  display: flex;
  width: 100%;
  align-items: center;
  overflow: auto;

  &::-webkit-scrollbar {
    display: none;
  }
  .tag {
    padding: 0 5px;
    display: flex;
    flex: 1;
    align-items: center;

    .icon {
      height: 16px;
      width: 16px;

      img {
        height: 100%;
        width: 100%;
      }
    }
    .text {
      white-space: nowrap;
      font-size: 14px;
      font-weight: 600;
      color: #72b4e2;
    }
  }
}
</style>
